home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 002 / emacssrc.arc / EDEF.H < prev    next >
Encoding:
C/C++ Source or Header  |  1987-02-02  |  8.8 KB  |  190 lines

  1. /*    EDEF:        Global variable definitions for
  2.  
  3.             MicroEMACS 3.2
  4.  
  5.  
  6.  
  7.             written by Dave G. Conroy
  8.  
  9.             modified by Steve Wilhite, George Jones
  10.  
  11.             greatly modified by Daniel Lawrence
  12.  
  13. */
  14.  
  15.  
  16.  
  17. /* some global fuction declarations */
  18.  
  19.  
  20.  
  21. char *malloc();
  22.  
  23. char *strcpy();
  24.  
  25. char *strcat();
  26.  
  27. char *strncpy();
  28.  
  29. char *itoa();
  30.  
  31. char *getval();
  32.  
  33. char *gtenv();
  34.  
  35. char *gtusr();
  36.  
  37. char *gtfun();
  38.  
  39. char *token();
  40.  
  41. char *ltos();
  42.  
  43. char *flook();
  44.  
  45.  
  46.  
  47. #ifdef    maindef
  48.  
  49.  
  50.  
  51. /* for MAIN.C */
  52.  
  53.  
  54.  
  55. /* initialized global definitions */
  56.  
  57.  
  58.  
  59. int     fillcol = 72;                   /* Current fill column          */
  60.  
  61. short   kbdm[NKBDM];            /* Macro                        */
  62.  
  63. char    pat[NPAT];                      /* Search pattern        */
  64.  
  65. char    rpat[NPAT];            /* replacement pattern        */
  66.  
  67. char    *execstr = NULL;        /* pointer to string to execute    */
  68.  
  69. char    golabel[NPAT] = "";        /* current line to go to    */
  70.  
  71. int    execlevel = 0;            /* execution IF level        */
  72.  
  73. int    eolexist = TRUE;        /* does clear to EOL exist    */
  74.  
  75. int    revexist = FALSE;        /* does reverse video exist?    */
  76.  
  77. int    flickcode = FALSE;        /* do flicker supression?    */
  78.  
  79. char    *modename[] = {            /* name of modes        */
  80.  
  81.     "WRAP", "CMODE", "SPELL", "EXACT", "VIEW", "OVER", "MAGIC", "CRYPT"};
  82.  
  83. char    modecode[] = "WCSEVOMY";    /* letters to represent modes    */
  84.  
  85. int    gmode = 0;            /* global editor mode        */
  86.  
  87. int    gfcolor = 7;            /* global forgrnd color (white)    */
  88.  
  89. int    gbcolor    = 0;            /* global backgrnd color (black)*/
  90.  
  91. int     sgarbf  = TRUE;                 /* TRUE if screen is garbage    */
  92.  
  93. int     mpresf  = FALSE;                /* TRUE if message in last line */
  94.  
  95. int    clexec    = FALSE;        /* command line execution flag    */
  96.  
  97. int    mstore    = FALSE;        /* storing text to macro flag    */
  98.  
  99. struct    BUFFER *bstore = NULL;        /* buffer to store macro text to*/
  100.  
  101. int     vtrow   = 0;                    /* Row location of SW cursor */
  102.  
  103. int     vtcol   = 0;                    /* Column location of SW cursor */
  104.  
  105. int     ttrow   = HUGE;                 /* Row location of HW cursor */
  106.  
  107. int     ttcol   = HUGE;                 /* Column location of HW cursor */
  108.  
  109. int    lbound    = 0;            /* leftmost column of current line
  110.  
  111.                        being displayed */
  112.  
  113. int    taboff    = 0;            /* tab offset for display    */
  114.  
  115. int    metac = CTRL | '[';        /* current meta character */
  116.  
  117. int    ctlxc = CTRL | 'X';        /* current control X prefix char */
  118.  
  119. int    reptc = CTRL | 'U';        /* current universal repeat char */
  120.  
  121. int    abortc = CTRL | 'G';        /* current abort command char    */
  122.  
  123.  
  124.  
  125. int    quotec = 0x11;            /* quote char during mlreply() */
  126.  
  127. char    *cname[] = {            /* names of colors        */
  128.  
  129.     "BLACK", "RED", "GREEN", "YELLOW", "BLUE",
  130.  
  131.     "MAGENTA", "CYAN", "WHITE"};
  132.  
  133. KILL *kbufp  = NULL;        /* current kill buffer chunk pointer    */
  134.  
  135. KILL *kbufh  = NULL;        /* kill buffer header pointer        */
  136.  
  137. int kused = KBLOCK;        /* # of bytes used in kill buffer    */
  138.  
  139. WINDOW *swindow = NULL;        /* saved window pointer            */
  140.  
  141. int cryptflag = FALSE;        /* currently encrypting?        */
  142.  
  143. short    *kbdptr;        /* current position in keyboard buf */
  144.  
  145. short    *kbdend = &kbdm[0];    /* ptr to end of the keyboard */
  146.  
  147. int    kbdmode = STOP;        /* current keyboard macro mode    */
  148.  
  149. int    kbdrep = 0;        /* number of repetitions    */
  150.  
  151. int    restflag = FALSE;    /* restricted use?        */
  152.  
  153. long    envram = 0l;    /* # of bytes current in use by malloc */
  154.  
  155. int    macbug = FALSE;        /* macro debuging flag        */
  156.  
  157. char    errorm[] = "ERROR";    /* error literal        */
  158.  
  159. char    truem[] = "TRUE";    /* true literal            */
  160.  
  161. char    falsem[] = "FALSE";    /* false litereal        */
  162.  
  163. int    cmdstatus = TRUE;    /* last command status        */
  164.  
  165. char    palstr[49] = "";    /* palette string        */
  166.  
  167.  
  168.  
  169. /* uninitialized global definitions */
  170.  
  171.  
  172.  
  173. int     currow;                 /* Cursor row                   */
  174.  
  175. int     curcol;                 /* Cursor column                */
  176.  
  177. int     thisflag;               /* Flags, this command          */
  178.  
  179. int     lastflag;               /* Flags, last command          */
  180.  
  181. int     curgoal;                /* Goal for C-P, C-N            */
  182.  
  183. WINDOW  *curwp;                 /* Current window               */
  184.  
  185. BUFFER  *curbp;                 /* Current buffer               */
  186.  
  187. WINDOW  *wheadp;                /* Head of list of windows      */
  188.  
  189. BUFFER  *bheadp;                /* Head of list of buffers      */
  190.  
  191. BUFFER  *blistp;                /* Buffer for C-X C-B           */
  192.  
  193.  
  194.  
  195. BUFFER  *bfind();               /* Lookup a buffer by name      */
  196.  
  197. WINDOW  *wpopup();              /* Pop up window creation       */
  198.  
  199. LINE    *lalloc();              /* Allocate a line              */
  200.  
  201. char    sres[NBUFN];        /* current screen resolution    */
  202.  
  203.  
  204.  
  205. #else
  206.  
  207.  
  208.  
  209. /* for all the other .C files */
  210.  
  211.  
  212.  
  213. /* initialized global external declarations */
  214.  
  215.  
  216.  
  217. extern  int     fillcol;                /* Fill column                  */
  218.  
  219. extern  short   kbdm[];                 /* Holds kayboard macro data    */
  220.  
  221. extern  char    pat[];                  /* Search pattern               */
  222.  
  223. extern    char    rpat[];            /* Replacement pattern        */
  224.  
  225. extern    char    *execstr;        /* pointer to string to execute    */
  226.  
  227. extern    char    golabel[];        /* current line to go to    */
  228.  
  229. extern    int    execlevel;        /* execution IF level        */
  230.  
  231. extern    int    eolexist;        /* does clear to EOL exist?    */
  232.  
  233. extern    int    revexist;        /* does reverse video exist?    */
  234.  
  235. extern    int    flickcode;        /* do flicker supression?    */
  236.  
  237. extern    char *modename[];        /* text names of modes        */
  238.  
  239. extern    char    modecode[];        /* letters to represent modes    */
  240.  
  241. extern    KEYTAB keytab[];        /* key bind to functions table    */
  242.  
  243. extern    NBIND names[];            /* name to function table    */
  244.  
  245. extern    int    gmode;            /* global editor mode        */
  246.  
  247. extern    int    gfcolor;        /* global forgrnd color (white)    */
  248.  
  249. extern    int    gbcolor;        /* global backgrnd color (black)*/
  250.  
  251. extern  int     sgarbf;                 /* State of screen unknown      */
  252.  
  253. extern  int     mpresf;                 /* Stuff in message line        */
  254.  
  255. extern    int    clexec;            /* command line execution flag    */
  256.  
  257. extern    int    mstore;            /* storing text to macro flag    */
  258.  
  259. extern    struct    BUFFER *bstore;        /* buffer to store macro text to*/
  260.  
  261. extern    int     vtrow;                  /* Row location of SW cursor */
  262.  
  263. extern    int     vtcol;                  /* Column location of SW cursor */
  264.  
  265. extern    int     ttrow;                  /* Row location of HW cursor */
  266.  
  267. extern    int     ttcol;                  /* Column location of HW cursor */
  268.  
  269. extern    int    lbound;            /* leftmost column of current line
  270.  
  271.                        being displayed */
  272.  
  273. extern    int    taboff;            /* tab offset for display    */
  274.  
  275. extern    int    metac;            /* current meta character */
  276.  
  277. extern    int    ctlxc;            /* current control X prefix char */
  278.  
  279. extern    int    reptc;            /* current universal repeat char */
  280.  
  281. extern    int    abortc;            /* current abort command char    */
  282.  
  283.  
  284.  
  285. extern    int    quotec;            /* quote char during mlreply() */
  286.  
  287. extern    char    *cname[];        /* names of colors        */
  288.  
  289. extern KILL *kbufp;            /* current kill buffer chunk pointer */
  290.  
  291. extern KILL *kbufh;            /* kill buffer header pointer    */
  292.  
  293. extern int kused;            /* # of bytes used in KB        */
  294.  
  295. extern WINDOW *swindow;            /* saved window pointer        */
  296.  
  297. extern int cryptflag;            /* currently encrypting?    */
  298.  
  299. extern    short    *kbdptr;        /* current position in keyboard buf */
  300.  
  301. extern    short    *kbdend;        /* ptr to end of the keyboard */
  302.  
  303. extern    int kbdmode;            /* current keyboard macro mode    */
  304.  
  305. extern    int kbdrep;            /* number of repetitions    */
  306.  
  307. extern    int restflag;            /* restricted use?        */
  308.  
  309. extern    long envram;        /* # of bytes current in use by malloc */
  310.  
  311. extern    int    macbug;            /* macro debuging flag        */
  312.  
  313. extern    char    errorm[];        /* error literal        */
  314.  
  315. extern    char    truem[];        /* true literal            */
  316.  
  317. extern    char    falsem[];        /* false litereal        */
  318.  
  319. extern    int    cmdstatus;        /* last command status        */
  320.  
  321. extern    char    palstr[];        /* palette string        */
  322.  
  323.  
  324.  
  325. /* uninitialized global external declarations */
  326.  
  327.  
  328.  
  329. extern  int     currow;                 /* Cursor row                   */
  330.  
  331. extern  int     curcol;                 /* Cursor column                */
  332.  
  333. extern  int     thisflag;               /* Flags, this command          */
  334.  
  335. extern  int     lastflag;               /* Flags, last command          */
  336.  
  337. extern  int     curgoal;                /* Goal for C-P, C-N            */
  338.  
  339. extern  WINDOW  *curwp;                 /* Current window               */
  340.  
  341. extern  BUFFER  *curbp;                 /* Current buffer               */
  342.  
  343. extern  WINDOW  *wheadp;                /* Head of list of windows      */
  344.  
  345. extern  BUFFER  *bheadp;                /* Head of list of buffers      */
  346.  
  347. extern  BUFFER  *blistp;                /* Buffer for C-X C-B           */
  348.  
  349.  
  350.  
  351. extern  BUFFER  *bfind();               /* Lookup a buffer by name      */
  352.  
  353. extern  WINDOW  *wpopup();              /* Pop up window creation       */
  354.  
  355. extern  LINE    *lalloc();              /* Allocate a line              */
  356.  
  357. extern    char    sres[NBUFN];        /* current screen resolution    */
  358.  
  359.  
  360.  
  361. #endif
  362.  
  363.  
  364.  
  365. /* terminal table defined only in TERM.C */
  366.  
  367.  
  368.  
  369. #ifndef    termdef
  370.  
  371. extern  TERM    term;                   /* Terminal information.        */
  372.  
  373. #endif
  374.  
  375.  
  376.  
  377.  
  378.  
  379.